---
layout: single
property_name: text-align
---

<section id="text-align" class="property">
  <header class="property-header">
    <nav class="property-links">
        <a class="property-collection" href="{{site.url}}/typography/">
          In collection: <strong>typography</strong>
        </a>
      <a class="property-links-direct" href="{{site.url}}/property/text-align/" data-property-name="text-align" data-tooltip="Single page for this property">Permalink</a>
      <a class="property-share" data-tooltip="Share on Twitter or Facebook" data-property-name="text-align">Share</a>
      <a target="_blank" href="https://developer.mozilla.org/en/docs/Web/CSS/text-align" data-tooltip="See on Mozilla Developer Network" rel="external">MDN</a>
    </nav>
    <h2 class="property-name">
      <a href="#text-align"><span>#</span>text-align</a>
    </h2>
    <div class="property-description">
      <p>Defines how the text content of the element is horizontally aligned.</p>

    </div>

  </header>





    <section class="example">
      <header class="example-header">
        <p class="example-name">


          <code class="example-value" data-tooltip="Click to copy" data-clipboard-text="text-align: left;">text-align: left;</code>
        </p>
        <div class="example-description">
          <p>The text content is aligned to the <strong>left</strong>.</p>

        </div>
      </header>

      <aside class="example-preview">
        <div class="example-browser"><i></i><i></i><i></i></div>
        <div class="example-output">
          <div class="example-output-div text-align " id="text-align-left"><p class="block block--alpha"><strong>Hello world</strong><br>Lorem ipsum dolor sit amet, consectetur adipiscing elit. Etiam semper diam at erat pulvinar, at pulvinar felis blandit. Vestibulum volutpat tellus diam, consequat gravida libero rhoncus ut.</p></div>
        </div>
      </aside>
          <style type="text/css">#text-align-left{ text-align:left;}</style>
    </section>
    <section class="example">
      <header class="example-header">
        <p class="example-name">


          <code class="example-value" data-tooltip="Click to copy" data-clipboard-text="text-align: right;">text-align: right;</code>
        </p>
        <div class="example-description">
          <p>The text content is aligned to the <strong>right</strong>.</p>

        </div>
      </header>

      <aside class="example-preview">
        <div class="example-browser"><i></i><i></i><i></i></div>
        <div class="example-output">
          <div class="example-output-div text-align " id="text-align-right"><p class="block block--alpha"><strong>Hello world</strong><br>Lorem ipsum dolor sit amet, consectetur adipiscing elit. Etiam semper diam at erat pulvinar, at pulvinar felis blandit. Vestibulum volutpat tellus diam, consequat gravida libero rhoncus ut.</p></div>
        </div>
      </aside>
          <style type="text/css">#text-align-right{ text-align:right;}</style>
    </section>
    <section class="example">
      <header class="example-header">
        <p class="example-name">


          <code class="example-value" data-tooltip="Click to copy" data-clipboard-text="text-align: center;">text-align: center;</code>
        </p>
        <div class="example-description">
          <p>The text content is <strong>centered</strong>.</p>

        </div>
      </header>

      <aside class="example-preview">
        <div class="example-browser"><i></i><i></i><i></i></div>
        <div class="example-output">
          <div class="example-output-div text-align " id="text-align-center"><p class="block block--alpha"><strong>Hello world</strong><br>Lorem ipsum dolor sit amet, consectetur adipiscing elit. Etiam semper diam at erat pulvinar, at pulvinar felis blandit. Vestibulum volutpat tellus diam, consequat gravida libero rhoncus ut.</p></div>
        </div>
      </aside>
          <style type="text/css">#text-align-center{ text-align:center;}</style>
    </section>
    <section class="example">
      <header class="example-header">
        <p class="example-name">


          <code class="example-value" data-tooltip="Click to copy" data-clipboard-text="text-align: justify;">text-align: justify;</code>
        </p>
        <div class="example-description">
          <p>The text content is <strong>justified</strong>.</p>

        </div>
      </header>

      <aside class="example-preview">
        <div class="example-browser"><i></i><i></i><i></i></div>
        <div class="example-output">
          <div class="example-output-div text-align " id="text-align-justify"><p class="block block--alpha"><strong>Hello world</strong><br>Lorem ipsum dolor sit amet, consectetur adipiscing elit. Etiam semper diam at erat pulvinar, at pulvinar felis blandit. Vestibulum volutpat tellus diam, consequat gravida libero rhoncus ut.</p></div>
        </div>
      </aside>
          <style type="text/css">#text-align-justify{ text-align:justify;}</style>
    </section>

</section>
